<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
        <title>报名信息</title>
        <meta charset="UTF-8">
    </head>
    <style>  
    .t_border{
         border-bottom:#000000 solid 1px;
    }
    .mytitle{
        display: none;
    }
    td{
        padding-left: 20px;
    }

    </style>
    <body class='all ub-img1'>
        <table cellspacing="0" style="text-align: center;">
            <tr>
                <td class="t_border">活动名称</td>
                <td class="t_border" style="width: 70px;">姓名</td>
                <td class="t_border" style="width: 70px;">性别</td>
                <td class="t_border">人群属性</td>
                <td class="t_border">电话</td>
                <td class="t_border">单位</td>
                <td class="t_border">身份证</td>
                <td class="t_border">省份</td>
                <td class="t_border">城市</td>
                <td class="t_border">地区</td>
                <td class="t_border">详细地址</td>
                <td class="t_border">体验时间</td>
                <td class="t_border">推荐手机号</td>
            </tr> 
            <tr style="height: 25px; ">
                <td class="claer_border" colspan="15"></td>
            </tr>     
            <?php 
            $parent_num=0;
            $children_num=0;
            foreach ($model->getData() as $key => $value) {
                $parent_num+=1;
            ?>
            <tr>
                <td><?php echo CHtml::encode($value->ad->activity->title);?></td>
                <td><?php echo CHtml::encode($value->username);?></td>
                <td><?php echo CHtml::encode($value->sex);?></td>
                <td><?php echo CHtml::encode($value->crowd->title);?></td>
                <td><?php echo CHtml::encode($value->phone);?></td>
                <td><?php echo CHtml::encode($value->company);?></td>
                <td><?php echo CHtml::encode($value->code);?></td>
                <td><?php echo CHtml::encode($value->province);?></td>
                <td><?php echo CHtml::encode($value->city);?></td>
                <td><?php echo CHtml::encode($value->area);?></td>
                <td><?php echo CHtml::encode($value->address);?></td>
                <td><?php echo CHtml::encode(date('Y-m-d',strtotime($value->ad->clander_start)));?></td>
                <td><?php echo CHtml::encode($value->recommend);?></td>
            </tr>
            <tr style="height: 10px;">
                <td colspan="15" class="claer_border"></td>
            </tr>      
            <?php 
            $c=  Children::model()->findAll('party_id='.$value->id);
            if(count($c)<=0){
            ?>
            <tr>
                <td colspan="1"></td>
                <td colspan="15" style=" text-align: left">未携带儿童</td>
            </tr>
            <tr style="height: 10px;">
                <td class="t_border" colspan="15"></td>
            </tr>    
            <?php
             }else{
                foreach ($c as $key => $value) {
                    $children_num+=1;
            ?>
            <tr>
                <td colspan="1"></td>
                <td style=" text-align: left" colspan=15"> 
                    家长：<?php echo CHtml::encode($value->party->username);?>
                    儿童姓名：<?php echo CHtml::encode($value->username);?>
                    性别：<?php echo CHtml::encode($value->sex);?>
                    年龄：<?php echo CHtml::encode($value->age);?>
                    年级：<?php echo CHtml::encode($value->grade);?>
                    学校：<?php echo CHtml::encode($value->school);?>
                </td>
            </tr>
            <tr style="height: 10px;">
                <td colspan="15"></td>
            </tr>        

            <?php 
            }?>
            <tr>
                <td class="t_border" colspan="15"></td>
            </tr>            
            <?php }?>            
            <tr style="height: 30px;">
                <td  colspan="15"></td>
            </tr>  
             <?php  }?>     
        </table>       
        <div>家长总数量：<?php echo CHtml::encode($parent_num);?> 儿童总数量：<?php echo CHtml::encode($children_num);?></div> 
    </body>
</html>


